home *** CD-ROM | disk | FTP | other *** search
- FAILAT
-
- Instructs a command sequence not to fail unless a given error condition is
- returned.
-
- Format
-
- FAILAT [<n>]
-
- Template
-
- RCLIM/N
-
- Location
-
- Internal
-
- Commands indicate that they have failed by setting a nonzero return code. The
- return code, normally 5, 10, or 20, indicates the severity of the error. A
- return code greater than or equal to a certain limit, the fail limit,
- terminates a sequence of non-interactive commands (commands specified after
- RUN or in a script).
-
- Use the FAILAT command to alter the fail limit RCLIM (Return Code Limit) from
- its initial value of 10. If you increase the limit, you indicate that certain
- classes of error should not be regarded as fatal and that execution of
- subsequent commands can proceed after the error. The argument must be a
- positive number. The fail limit is reset to the initial value of 10 on exit
- from the command sequence.
-
- If the argument is omitted, the current fail limit is displayed.
-
- Example:
-
- Assume a script contains the following lines:
-
- COPY DF0:MyFile to RAM:
- ECHO "MyFile being copied."
-
- If MyFile cannot be found, the scripts is aborted and the following message
- appears in the Shell window:
-
- COPY: object not found
- COPY failed returncode 20:
-
- However, if you changed the return code limit to higher than 20, the script
- continues even if the COPY command fails. For example, if you changed the
- script to read:
-
- FAILAT 21
- COPY DF0:MyFile to RAM:
- ECHO "MyFile being copied."
-
- Even if MyFile cannot be found, the script continues. The following message
- appears in the Shell window:
-
- COPY: object not found
- MyFile being copied.
-
- See also: ECHO, EXECUTE.
-